export namespace app {
	
	export class Book {
	    ID: number;
	    Name: string;
	    LastLine: number;
	    Total: number;
	    // Go type: time
	    CreatedAt: any;
	    // Go type: time
	    UpdatedAt: any;
	
	    static createFrom(source: any = {}) {
	        return new Book(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.ID = source["ID"];
	        this.Name = source["Name"];
	        this.LastLine = source["LastLine"];
	        this.Total = source["Total"];
	        this.CreatedAt = this.convertValues(source["CreatedAt"], null);
	        this.UpdatedAt = this.convertValues(source["UpdatedAt"], null);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class Dir {
	    Label: string;
	    Index: number;
	
	    static createFrom(source: any = {}) {
	        return new Dir(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Label = source["Label"];
	        this.Index = source["Index"];
	    }
	}
	export class BookAfterProc {
	    Book: Book;
	    Dirs: Dir[];
	    Full: string[];
	
	    static createFrom(source: any = {}) {
	        return new BookAfterProc(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Book = this.convertValues(source["Book"], Book);
	        this.Dirs = this.convertValues(source["Dirs"], Dir);
	        this.Full = source["Full"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class BookFast {
	    Book: Book;
	    Dirs: Dir[];
	    FullLen: number;
	    Content: string[];
	    ContentStart: number;
	
	    static createFrom(source: any = {}) {
	        return new BookFast(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Book = this.convertValues(source["Book"], Book);
	        this.Dirs = this.convertValues(source["Dirs"], Dir);
	        this.FullLen = source["FullLen"];
	        this.Content = source["Content"];
	        this.ContentStart = source["ContentStart"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class BooksList {
	    Data: Book[];
	    Total: number;
	
	    static createFrom(source: any = {}) {
	        return new BooksList(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.Data = this.convertValues(source["Data"], Book);
	        this.Total = source["Total"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	
	export class conf {
	    FontSize: number;
	    FontWeight: number;
	    LineHeight: number;
	    LetterSpacing: number;
	    FontColor: string;
	    BackgroundColor: string;
	    TitleColor: string;
	    ProgressColor: string;
	
	    static createFrom(source: any = {}) {
	        return new conf(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.FontSize = source["FontSize"];
	        this.FontWeight = source["FontWeight"];
	        this.LineHeight = source["LineHeight"];
	        this.LetterSpacing = source["LetterSpacing"];
	        this.FontColor = source["FontColor"];
	        this.BackgroundColor = source["BackgroundColor"];
	        this.TitleColor = source["TitleColor"];
	        this.ProgressColor = source["ProgressColor"];
	    }
	}

}

